package com.ludomancy.gamelib;

import java.applet.AudioClip;

public class Sound
{
	AudioClip clip;
	public static boolean soundActivated = true;
	
	public Sound(String path)
	{
		clip = ResourceManager.getSound(path);
	}
	
	public static void play(String path)
	{
		new Sound(path).play();
	}
	
	public void play()
	{
		if(soundActivated)
		{
			clip.play();
		}
	}
	
	public void stop()
	{
		clip.stop();
	}
}
